Skip to content

[DX-1417] fix(nav): render top-level pricing nav links as clickable links#3405

Merged
jamiehenson merged 1 commit into
mainfrom
dx-1417-sidebar-pricing-links
Jun 12, 2026
Merged

[DX-1417] fix(nav): render top-level pricing nav links as clickable links#3405
jamiehenson merged 1 commit into
mainfrom
dx-1417-sidebar-pricing-links

Conversation

@jamiehenson

@jamiehenson jamiehenson commented Jun 12, 2026

Copy link
Copy Markdown
Member

What

Top-level nav entries that are plain links (a link with no child pages) now render as clickable links in the left sidebar instead of static headings.

Resolves DX-1417.

Why

SectionNav in LeftSidebar.tsx rendered every top-level nav entry as a bold heading and only rendered anything interactive when the entry had a pages array. The per-product pricing pages were added to the nav as top-level link-only entries, so they showed as dead headings with no way to reach the page.

This affected all five products that added a top-level pricing link in the recent nav refactor:

  • Pub/Sub — /docs/pub-sub/pricing
  • Chat — /docs/chat/pricing
  • Spaces — /docs/spaces/pricing
  • LiveObjects — /docs/liveobjects/pricing
  • LiveSync — /docs/livesync/pricing

Originally spotted as the empty "LiveSync pricing" header on https://ably.com/docs/livesync/postgres.

How

In SectionNav, a top-level entry with a link and no pages now renders as a Link with active-page highlighting and the existing language-param preservation (buildLinkWithParams), reusing the same patterns as the child nav links. One renderer change fixes all five products at once — no nav data changes needed.

Testing

  • Added a unit test asserting a top-level link entry renders as an anchor with the correct href.
  • yarn jest src/components/Layout/LeftSidebar.test.tsx — all pass.
  • yarn lint — clean.

On the review app, the "… pricing" entry in the left sidebar should now be clickable for each afflicted product:

🤖 Generated with Claude Code

SectionNav rendered every top-level nav entry as a static heading and only
made content interactive when it had a `pages` array. Top-level link-only
entries — the per-product pricing pages (Pub/Sub, Chat, Spaces, LiveObjects,
LiveSync) — therefore showed as dead headings with no way to reach the page.

Render a top-level entry with a `link` and no `pages` as a clickable link
instead, with active-state highlighting and the existing language-param
preservation. Add a test covering the new behaviour.

DX-1417

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6b128c06-e142-4a05-8f26-5abe5118e359

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dx-1417-sidebar-pricing-links

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jamiehenson jamiehenson added the review-app Create a Heroku review app label Jun 12, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-dx-1417-sideb-2flaij June 12, 2026 14:16 Inactive
@jamiehenson jamiehenson marked this pull request as ready for review June 12, 2026 14:29
@jamiehenson jamiehenson changed the title fix(nav): render top-level pricing nav links as clickable links [DX-1417] fix(nav): render top-level pricing nav links as clickable links Jun 12, 2026
@jamiehenson jamiehenson requested review from a team, AndyTWF and kennethkalmer and removed request for a team June 12, 2026 14:31
@jamiehenson jamiehenson merged commit 40eca14 into main Jun 12, 2026
8 checks passed
@jamiehenson jamiehenson deleted the dx-1417-sidebar-pricing-links branch June 12, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

3 participants